{include file="member.header.html"}
{include file="title.html"}
    <ul class="order_ul">
        <a href="{url index.php?app=seller_order}" ><li class="{if $curtype eq 'all_orders'}active{/if}">{$lang.all}</li></a>
            <a href="{url index.php?app=seller_order&type=pending}"><li class="{if $curtype eq 'pending'}active{/if}">{$lang.pending}</li></a>
            <a href="{url index.php?app=seller_order&type=submitted}"><li class="{if $curtype eq 'submitted'}active{/if}">{$lang.submitted}</li></a>
            <a href="{url index.php?app=seller_order&type=accepted}"><li class="{if $curtype eq 'accepted'}active{/if}">{$lang.accepted}</li></a>
            <a href="{url index.php?app=seller_order&type=shipped}"><li class="{if $curtype eq 'shipped'}active{/if}">{$lang.shipped}</li></a>
            <a href="{url index.php?app=seller_order&type=finished}"><li class="{if $curtype eq 'finished'}active{/if}">{$lang.finished}</li></a>
            <a href="{url index.php?app=seller_order&type=canceled}"><li class="{if $curtype eq 'canceled'}active{/if}">{$lang.canceled}</li></a>
    </ul>

<form method="get">
    <ul class="form_content">
        <li>
                <input type="text" name="order_sn" value="{$query.order_sn|escape}" placeholder="{$lang.order_sn}">
        </li>
        <li>
            <input type="text" name="buyer_name" value="{$query.buyer_name|escape}" placeholder="{$lang.buyer_name}">
        </li>
        <li style="margin-bottom:10px;">
            <input type="hidden" name="app" value="seller_order" />
            <input type="hidden" name="act" value="index" />
            <input type="hidden" name="type" value="{$type}" />
            <input type="submit" class="red_btn" value="{$lang.search}" />
        </li>
        <!--{if $query.buyer_name or $query.add_time_from or $query.add_time_to or $query.order_sn}-->
        <li>
            <a class="white_btn" href="{url app=seller_order&type=$query.type}">{$lang.cancel_query}</a>
        </li>
        <!--{/if}-->
    </ul>
</form>



<!------------订单页--------------------------->
<div class="u_order">
    <!--{foreach from=$orders item=order}-->
    <div class="orderbox">
        <h2><span>{$lang.buyer_name}：{$order.buyer_name|escape}</span><b><font style="color:#b20005;">{$order.status|modifier:order_status}<!--{if $order.evaluation_status}-->,&nbsp;{$lang.already_evaluate}<!--{/if}--></font></b></h2>
        <div class="detail">
            <p>{$lang.order_sn}：{$order.order_sn}</p>
            <p>{$lang.phone_mob}：<!--{ if $order.phone_mob neq ''}-->{$order.phone_mob}<!--{/if}--></p>
            <p>{$lang.payment_name}：{$order.payment_name|escape}</p>
            <p>​{$lang.order_amount}：{$order.order_amount|price}</p>​
        </div>
        
        <!--{foreach from=$order.order_goods item=goods}-->
        <div class="detail">
            <a href="{url app=goods&id=$goods.goods_id}"> <img src="{$site_url}/{$goods.goods_image}" /></a>
            <p class="title">{$goods.goods_name|escape}</p>
            <p>​{$goods.specification}​</p>​
            <p><strong>{$goods.price|price}</strong><span>{$lang.quantity}：{$goods.quantity}</span></p>
            <p>
                <!--{if $goods.status eq 'SUCCESS'}-->
                            <a href="{url app=buyer_order&act=view&order_id=$goods.order_id}" class="gray">{$lang.has_confirm}</a>
                            <!--{elseif $goods.refund_status eq 'SUCCESS'}-->
                            <a href="{url app=refund&act=view&refund_id=$goods.refund_id}">{$lang.refund_succed}</a>
                            <!--{elseif $goods.refund_status eq 'CLOSED'}-->
                            <a href="{url app=refund&act=view&refund_id=$goods.refund_id}" class="gray">{$lang.refund_colse}</a>
                            <!--{elseif $goods.refund_status eq 'FAILED'}-->
                            <a href="{url app=refund&act=view&refund_id=$goods.refund_id}" style="color:#ff6600">{$lang.refund_fail}</a>
							<!--{elseif $goods.refund_status eq 'WAIT_SELLER_AGREE'}-->
                            <a href="{url app=refund&act=view&refund_id=$goods.refund_id}">{$lang.refund}</a>
                            <!--{/if}-->
            </p>
        </div>
        <!--{/foreach}-->
        
        <p class="opr">
            <input type="button" value="{$lang.received_pay}" class="white_btn" ectype="dialog" dialog_id="seller_order_received_pay" dialog_width="100%" uri="index.php?app=seller_order&amp;act=received_pay&amp;order_id={$order.order_id}&ajax" dialog_title="{$lang.received_pay}" id="order{$order.order_id}_action_received_pay"{if $order.status neq ORDER_PENDING} style="display:none"{/if} />
                   <input type="button" value="{$lang.confirm_cod_order}" class="white_btn" ectype="dialog" uri="index.php?app=seller_order&amp;act=confirm_order&amp;order_id={$order.order_id}&ajax" dialog_id="seller_order_confirm_order" dialog_title="{$lang.confirm_cod_order}"  dialog_width="100%" id="order{$order.order_id}_action_confirm"{if $order.status neq ORDER_SUBMITTED} style="display:none"{/if} />
                   <input type="button" value="{$lang.adjust_fee}" class="white_btn" uri="index.php?app=seller_order&amp;act=adjust_fee&amp;order_id={$order.order_id}&ajax" dialog_width="100%" dialog_title="{$lang.adjust_fee}" ectype="dialog"  dialog_id="seller_order_adjust_fee" id="order{$order.order_id}_action_adjust_fee"{if $order.status neq ORDER_PENDING and $order.status neq ORDER_SUBMITTED} style="display:none"{/if} />
                   <input type="button" value="{$lang.shipped_order}" class="white_btn" ectype="dialog" dialog_title="{$lang.shipped_order}" dialog_id="seller_order_shipped" uri="index.php?app=seller_order&amp;act=shipped&amp;order_id={$order.order_id}&ajax"  dialog_width="100%" id="order{$order.order_id}_action_shipped"{if $order.status neq ORDER_ACCEPTED} style="display:none"{/if} />
                   <!--//已发货-->
                   <input type="button" value="{$lang.finish_order}" class="white_btn" ectype="dialog" dialog_id="seller_order_finished"  dialog_title="{$lang.finish_order}" uri="index.php?app=seller_order&amp;act=finished&order_id={$order.order_id}&ajax" dialog_width="100%"  id="order{$order.order_id}_action_finish"{if $order.payment_code neq 'cod' or $order.status neq ORDER_SHIPPED} style="display:none"{/if} />
                   <!--{if $enable_express}-->
                   <a class="white_btn" href="http://m.kuaidi100.com/index_all.html?type={$order.express_company}&postid={$order.invoice_no}&callbackurl={$site_url}/mobile/index.php?app=seller_order" {if $order.status neq ORDER_SHIPPED && $order.status neq ORDER_FINISHED} style="display:none"{/if}>{$lang.view_delivery_track}</a>
                   <!--{/if}-->
                   <input type="button" value="{$lang.edit_invoice_no}" class="white_btn" ectype="dialog" dialog_title="{$lang.edit_invoice_no}" uri="index.php?app=seller_order&amp;act=shipped&amp;order_id={$order.order_id}&ajax" dialog_id="seller_order_shipped" dialog_width="100%" id="order{$order.order_id}_action_edit_invoice_no"{if $order.status neq ORDER_SHIPPED} style="display:none"{/if} />
                   <!-- //不是取消和完成的订单就可以取消-->
                   <input type="button" value="{$lang.cancel_order}" class="white_btn" ectype="dialog" uri="index.php?app=seller_order&amp;act=cancel_order&order_id={$order.order_id}&ajax" dialog_title="{$lang.cancel_order}" dialog_id="seller_order_cancel_order" dialog_width="100%" id="order{$order.order_id}_action_cancel"{if $order.status eq ORDER_CANCELED or $order.status eq ORDER_FINISHED} style="display:none"{/if} />
                   <a class="white_btn" href="{url app=seller_order&act=view&order_id=$order.order_id}" >{$lang.view_order}</a>
        </p>
    </div>
    <!--{foreachelse}-->

    <div class="null">
        <p>{$lang.no_records}~</p>
    </div>
    <!--{/foreach}-->
</div>
<script>
    $(function(){
        $("img").each(function(){
            var temp_spec=$(this).attr('src');
            if(temp_spec.indexOf('/goodsspec/')>-1){
                var my_site=SITE_URL;
                $(this).attr('src',my_site.replace('/mobile','/')+temp_spec);
                $(this).css('width','24px');
                $(this).css('height','24px');
            }
        })
    })
</script>
{include file=member.page.bottom.html}

<iframe name="seller_order" style="display:none;"></iframe>
{include file="footer.html"}